use RFSMART;
go

Create Partition Function TxID (int)
as Range right for values (10000, 20000, 50000)
use test

go

create partition function myRangePF1(int)

as range left for values (1,100,1000)

--create filegroups test1fg,test2fg,test3fg,test4fg for test database

create partition scheme

ps_TxiD as partition TxID to (test1fg,test2fg,test3fg,test4fg )

Alter table dbo.RFS_TXHeader 
( switch ps_Txid to 